using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;

namespace RxjhServer.DbClss
{
	public class Config
	{
		private static string iniPath = Application.StartupPath + "\\游戏相关配置.ini";

		private static string string_2 = Application.StartupPath + "\\石头相关配置.ini";

		private static string string_1 = Application.StartupPath + "\\气功相关配置.ini";

		private static string string_3 = Application.StartupPath + "\\挂机相关配置.ini";

		private static string string_4 = Application.StartupPath + "\\宠物合成相关配置.ini";

		public static string Path
		{
			set
			{
				iniPath = value;
			}
		}

		public static string Pathst
		{
			set
			{
				string_2 = value;
			}
		}

		public static string Pathqg
		{
			set
			{
				string_1 = value;
			}
		}

		public static string Pathgj
		{
			set
			{
				string_3 = value;
			}
		}

		public static string Pathgg
		{
			set
			{
				string_4 = value;
			}
		}

		[DllImport("kernel32")]
		private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);

		[DllImport("kernel32")]
		private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);

		public static void IniWriteValue(string Section, string Key, string Value)
		{
			WritePrivateProfileString(Section, Key, Value, iniPath);
		}

		public static string IniReadValue(string Section, string Key)
		{
			StringBuilder stringBuilder = new StringBuilder(1024);
			GetPrivateProfileString(Section, Key, "", stringBuilder, 1024, iniPath);
			return stringBuilder.ToString();
		}

		public static string IniReadValust(string Section, string Key)
		{
			StringBuilder stringBuilder = new StringBuilder(1024);
			GetPrivateProfileString(Section, Key, "", stringBuilder, 1024, string_2);
			return stringBuilder.ToString();
		}

		public static string IniReadValuee(string Section, string Key)
		{
			StringBuilder stringBuilder = new StringBuilder(1024);
			GetPrivateProfileString(Section, Key, "", stringBuilder, 1024, string_1);
			return stringBuilder.ToString();
		}

		public static string IniReadValugj(string Section, string Key)
		{
			StringBuilder stringBuilder = new StringBuilder(1024);
			GetPrivateProfileString(Section, Key, "", stringBuilder, 1024, string_3);
			return stringBuilder.ToString();
		}

		public static string IniReadValugk(string Section, string Key)
		{
			StringBuilder stringBuilder = new StringBuilder(1024);
			GetPrivateProfileString(Section, Key, "", stringBuilder, 1024, string_4);
			return stringBuilder.ToString();
		}
	}
}
